package com.yf.dxs.wo.req.msg;

import com.yf.dxs.wo.entity.WoLevelMsgDO;
import com.yf.dxs.wo.redis.AbstractRedisMsg;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 会员开卡消息
 * https://doc.weimobcloud.com/detail?menuId=19&childMenuId=1&tag=2483&id=2994&isold=2
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class WoLevelMsg {

    private String bosId;

    private Long wid;

    private String reason;

    private Long changeTime;

    private Long newLevelId;

    private Long oldLevelId;

    public WoLevelMsgDO toEntity(){
        WoLevelMsgDO entity = new WoLevelMsgDO();
        entity.setWid(wid);
        entity.setReason(reason);
        entity.setNewLevelId(newLevelId);
        entity.setOldLevelId(oldLevelId);
        entity.setChangeTime(new Date(changeTime));
        return entity;
    }
    
}
